import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
import java.util.*;

/**
 * Edificio Class
 * @author Hugo Armando Rodríguez Flores 
 * @version May 6th 2013
 */
public class Edificio extends Decoracion
{
    private ArrayList<GreenfootImage> building; //Stores the images for the buildings
    
    /**
     * This constructor add all the images to an Arraylist, then it sets a specified image.
     * @param aBuilding is the number of the building one want to be displayed
     */
    public Edificio (int aBuilding)
    {
        String tempString=new String(); //Temporal string that gets the name of the image file.
        building=new ArrayList<GreenfootImage>();
        for (int i=0; i<18; i++)
        {
            tempString="edif"+(i+1)+".png"; //this concatenates a defined name.
            building.add(new GreenfootImage(tempString));
        }
        this.setImage(building.get(aBuilding));
    }
}
